﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Csla;

namespace Sireass.Bl
{
	[Serializable] 
	public class AsignacionEditList : BusinessListBase<AsignacionEditList, AsignacionEdit>
	{
		#region Factory
		#if !SILVERLIGHT
		public static AsignacionEditList NewAsignacionEditList()
		{
			return DataPortal.Create<AsignacionEditList>();
		}		
		#endif
		public static void NewAsignacionEditList(EventHandler<DataPortalResult<AsignacionEditList>> callback)
		{
			DataPortal.BeginCreate<AsignacionEditList>(callback);
		}		
		#endregion

		#region Métodos
		public static void AddObjectAuthorizationRules()
		{
			// TODO: add authorization rules 
			//AuthorizationRules.AllowGet(typeof(EditableRootList), "Role"); 
		} 
		#endregion

		#region DataPortal
		[RunLocal]
		protected override void DataPortal_Create()
		{
			base.DataPortal_Create();
		}		

		[Transactional(TransactionalTypes.TransactionScope)]
		protected override void DataPortal_Update()
		{
			using (var dalManager = Sireass.Dal.DalFactory.GetManager())
			{
				base.Child_Update();
			}
		}
		#endregion 
	}
}
